package Tests;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import DataReading.VesselList;
import DataReading.Vessel;


public class VesselListTest {
	
	private static VesselList vesselList;
	private static Vessel[] list;
	private static Vessel v;
	
	@BeforeClass
	public static void setUpBeforeClass() throws Exception{
		vesselList = new VesselList(10);
		list = vesselList.getList();
	}
	
	@Test
	public void testVesselList(){
		assertNotNull(vesselList); // testing if not null
	}
	
	@Test
	public void testGetVesselAtIndex(){
		assertSame(list[5],vesselList.getVesselAtIndex(5));
	}
	
	@Test
	public void testSetVesselAtIndex(){
		assertSame(v, vesselList.getVesselAtIndex(5));
	}
	
	@Test
	public void testAdd(){
		assertSame(v, vesselList.getVesselAtIndex(5));
	}
	
	
	@Test
	public void testRemove(){
		assertNull(list[5]);
	}
	
	@Test
	public void testExpandValues(){
		assertEquals(20, list.length*2);
	}
	
	/*@Test //not ready for testing yet
	public void testTrimList(){
		
	}*/
	
	
}
